package demo523;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class SqlConnection{
    private static final String URL = "jdbc:mysql://localhost:3306/usersDb";
    private static final String USERNAME = "root";
    private static final String PASSWORD = "123456";

    public static Connection getCon() throws ClassNotFoundException, SQLException{
        Class.forName("com.mysql.jdbc.Driver");
        return DriverManager.getConnection(URL, USERNAME, PASSWORD);
    }

}
